<SCRIPT type="text/javascript">
	var setting = {
		data: {
			simpleData: {
				enable: true
			}
		},
		callback: {
			//onCollapse: alert("up"),
			onExpand: function(){
				if (treeNiceScroll) {
					treeNiceScroll.resize();
				} 
			}
		},
		view: {
			showLine: false
		}
	};
	var zNodes1 =[
		{ id:'0', pId:0, name:"数据模型目录（/）", open:true, icon:"/assets/images/icon-file-closed.png",url:"/${orgi}/dm/cube/index.html",target:"_self"}
		<#if cubePackageList??>
		<#list cubePackageList as cubePackage>
		,{ id:"${cubePackage.id!''}", pId:"${cubePackage.parentid!''}", name:"${cubePackage.name!''}", icon:"/assets/images/icon-file-closed.png",url:"/${orgi}/dm/cube/cubedic/${cubePackage.id!''}.html",target:"_self"}
		</#list>
		</#if>
	];
	$(document).ready(function(){
		var ztree = $.fn.zTree.init($(document.getElementById("zTree_adminLIst")), setting, zNodes1);
		ztree.selectNode(ztree.getNodeByParam("id", "${dicid}", null));
		$(".nav_tabwps_3").rs_simpleTabs({
			tabElem				:".nav_tapIthems",			//切换标签的子元素
			tabCurrent			:"cur",						//切换标签的Current状态
			tabCont				:".nav_tabwps_3con",		//切换的元素内容父级
			tabContLayer		:".nav_tabwps_3_layouts",	//切换的元素内容层
			tabContLayerShow	:"show",					//切换的元素Current状态
			afclick				:null						//回调函数接口			
		});



	});
//提交用户复制表单
function submitCopyForm(){
	$("#cubeform").attr("action","/${orgi}/dm/cube/cubecopyList.html");
	$("#cubeform").submit();
}
//提交用户移动表单
function submitMoveForm(){
	$("#cubeform").attr("action","/${orgi}/dm/cube/cubemoveList.html");
	$("#cubeform").submit();
}
//提交用户删除表单
function submitDelForm(){
	if($("input[name='cubeids']:checked").length>0){
		art.confirm('您确定要删除这些模型吗？' 
		, function(){
			$("#cubeform").attr("action","/${orgi}/dm/cube/${dicid}/cubedellist.html");
			$("#cubeform").submit();
		
		} 
		, function(){})
		
	}else{
		alertMsg("请选择要删除的模型！");
	}
	
	
}

function modelcopy(){
	if($("input[name='cubeids']:checked").length>0){
		$("#cubecopy").click();
	}else{
		alertMsg("请先选择要复制的模型！");
	}
}

function modelmove(){
	if($("input[name='cubeids']:checked").length>0){
		$("#cubemove").click();
	}else{
		alertMsg("请先选择要移动的模型！");
	}
}
</SCRIPT>

<div class="rs_layout_top breadCrumbWrap">
	<div class="breadCrumbStart">您当前的位置是在：</div>
	<ul class="breadCrumb">
		<li class="bc_ithems"><a href="/${orgi}/dm/cube/index.html">数据模型管理</a></li>
		<#if locationdics??>
			<#list locationdics?reverse as local>
		<li class="bc_ithems">
			<a href="/${orgi}/dm/cube/cubedic/${local.id!''}.html">${local.name!''	}</a>
		</li>	
			</#list>
		</#if>
	</ul>
	<ul class="controlButtons">
		<li class="cbtn-icon-3" data-toggle="ajax" id="newreport" data-width="480" href="/${orgi}/dm/cube/${dicid}/cubedicadd.html" title="添加目录"></li>
		<#if dicid?? && dicid!="0">
		<li class="cbtn-icon-38" data-toggle="ajax" id="edit" data-width="480" href="/${orgi}/dm/cube/${dicid}/cubedicedit.html" title="编辑目录"></li>
		<li class="cbtn-icon-39" id="del" data-width="600" data-height="300" title="删除目录" onclick="art.confirm('您确定删除该目录？' , function(){location.href='/${orgi}/dm/cube/cubedicrm/${dicid}.html';} , function(){})"></li>
		</#if>
		<li class="cbtn-icon-44" data-width="480" data-toggle="ajax" id="newreport" href="/${orgi}/dm/cube/${dicid}/cubeadd.html" title="创建新模型"></li>
		<li data-toggle="ajax" id="cubeimport" data-width="480" href="/${orgi}/dm/cube/${dicid}/cubeimport.html" class="cbtn-icon-45" title="导入数据模型"></li>
		<li class="cbtn-icon-list" data-width="780" data-toggle="ajax" id="newreport" href="/${orgi}/dm/cube/publishcube.html" title="已发布模型"></li>
	</ul>
</div>
<div class="rs_layout_left" resizable="true" style="width:230px;">
	<div class="lftTreeWrap">
		<div class="ztree" id="zTree_adminLIst"></div>
	</div>
</div>
<!--<div class="rs_layout_right" style="width:300px;"></div>-->
<div class="rs_layout_center">
	<div class="rs_layout">
		<div class="rs_layout_center"> 
			<div class="tableScrollWrap">
			<form id="cubeform" action="" method="post">
			<input id="dicid" type="hidden" name="dicid" value=""/>
				<table class="table_style_1">
					<thead>
						<tr>
							<th></th>
							<th><i class="verMidWrap">名称</i><i class="tbArrow"></i></th>
							<th class="minSize"><i class="verMidWrap">数据结算</i><i class="tbArrow"></i></th>
							<th class="minSize"><i class="verMidWrap">结算时间</i><i class="tbArrow"></i></th>
							<th class="minSize"><i class="verMidWrap">结算版本</i><i class="tbArrow"></i></th>
							<th class="minSize"><i class="verMidWrap">类型</i><i class="tbArrow"></i></th>
							<th class="minSize"><i class="verMidWrap">创建时间</i><i class="tbArrow"></i></th>
							<th class="minSize">操作</th>
						</tr>
					</thead>
					<tbody>
						<#if cubeList??>
						<#list cubeList as cube>
						<tr>
							<td class="tdIcons"><input value="${cube.id!''}" name="cubeids" type="checkbox"></td>
							<td><a href="/${orgi}/dm/cube/cubedesign/${cube.id!''}.html"><i class="icons_tablelist_1"></i>${cube.name!""}</a></td>
							<td class="minSize"><#if cube.createdata?? && cube.createdata == "true">已结算</#if></td>
							<td class="minSize"><#if cube.createdata?? && cube.createdata == "true">${cube.startdate?string("yyyy-MM-dd HH:mm:ss")}</#if></td>
							<td class="minSize"><#if cube.createdata?? && cube.createdata == "true">${cube.dataflag!'0'}</#if></td>
							<td class="minSize"><#if cube.dstype == "cube">立方体<#elseif cube.dstype == "table">数据表<#else>R3 rivuES</#if></td>
							<td class="minSize">${cube.createtime?string('yyyy-MM-dd HH:mm:ss')}</td>
							<td class="minSize">
								<i data-width="565" title="修改模型" href="/${orgi}/dm/cube/${dicid}/cubeedit/${cube.id!''}.html" id="cubeedit" data-toggle="ajax" class="tbControlIcon tci-16"></i>
								<a title="删除模型" href="javascript:void(0)" onclick="art.confirm('您确定要删除此模型吗？' , function(){location.href='/${orgi}/dm/cube/${dicid}/cubedelo/${cube.id!''}.html'} , function(){})"><i class="tbControlIcon tci-17"></i></a>
							</td>
						</tr>
						</#list>
						</#if>
					</tbody>
				</table>
				</form>
			</div>

		</div>
		<div class="rs_layout_bottom toolBar_bottom">
			<ul class="toolbarBottom_IconWrap">
				<li title="复制模型" onclick="modelcopy()" class="tb-icons-1" ></li>
				<li style="display: none;" title="复制模型" href="/${orgi}/dm/cube/cubecopy.html" id="cubecopy" data-width="480" data-toggle="ajax" class="tb-icons-1"></li>
				<li title="移动模型" onclick="modelmove()" class="tb-icons-2" ></li>
				<li style="display: none;" title="移动模型" href="/${orgi}/dm/cube/cubemove.html" id="cubemove" data-width="480" data-toggle="ajax" class="tb-icons-2"></li>
				<li onclick="submitDelForm();" class="tb-icons-4"></li>
			</ul>
		</div>
	</div>
</div>